import { http as $http } from './http.js';
// 基础组件模块请求
export const basicComponent = {
    // 添加组件
    addComponent: (param ={}) => {
        return $http.post('component/basic', param);
    },
    // 获取组件列表
    getComponentList: (param ={}) => {
        return $http.get('component/basic', param);
    },
    // 获取基础组件属性
    getBasicComponentAttr: (param ={}) => {
        return $http.get('component/basic/attribute', param);
    },
    // 添加基础组件属性
    addBasicComponentAttr: (param ={}) => {
        return $http.post('component/basic/attribute', param);
    },
    // 修改基础组件属性
    putBasicComponentAttr: (param ={}) => {
        return $http.put('component/basic/attribute', param);
    },
    // 获取基础组件属性类型
    getBasicComponentAttrType: (param ={}) => {
        return $http.get('component/basic/attribute/type', param);
    },
    // 获取基础组件类别
    getBasicComponentTypeList: (param ={}) => {
        return $http.get('component/basic/typeList', param);
    },
    // 修改基础组件
    putComponent: (param ={}) => {
        return $http.put('component/basic', param);
    },
}
// 页面模块
export const basicPage = {
    // 添加页面
    addPage: (param ={}) => {
        return $http.post('component/basic/pages', param);
    },
    // 获取用户页面列表
    getPageListByUser: (param ={}) => {
        return $http.get('component/basic/pages', param);
    },
    // 获取页面信息根据id
    getPageInfoById: (param ={}) => {
        return $http.get('component/basic/pages/byId', param);
    },
    // 修改页面信息
    putPage: (param ={}) => {
        return $http.put('component/basic/pages', param);
    },
}
// 公共模块
export const commonReq = {
    // 获取轮播图
    getCourselList: (param ={}) => {
        return $http.get('/common/carousel', param);
    },
}